<template>
  <h1>El-下拉选框组件</h1>
  <el-select placeholder="请选择您喜欢的城市" v-model="city" style="width: 400px;">
    <el-option label="北京" value="bj"></el-option>
    <el-option label="上海" value="sh"></el-option>
    <el-option label="广州" value="gz"></el-option>
    <el-option label="深圳" value="sz"></el-option>
  </el-select>
  <p>您选择的城市是:{{city}}</p>
</template>

<script setup>
import {ref} from "vue";

//定义变量用来保存用户选择的选项值
const city = ref('bj');
</script>

<style scoped>

</style>